#!/usr/bin/perl -W
select FILE;
open FILE, ">>default";
while(<>)
{
	if(/^\s*module\s+(\w+)/)
	{
		close FILE;
		open FILE,">>$1.v";
	}

	print FILE $_;

}

`rm default`;

